/**
 * @brief MCU 型号规格定义头文件
 * @detail 在此头文件中定义那些与 MCU 内部具体实现有关的定义，这些定义是标准的，但不同的 MCU 可能取值范围有所不同。
 * @note 注意: 用户不要包含此头文件！
 * @author 张勇 41204@qq.com
 * @date 2022-04
 */

#pragma once

//
// API 别名
//
// 设置外设时钟
#define RCC_PeriphClockCmd_DMA1(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1,		NewState)
#define RCC_PeriphClockCmd_DMA2(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA2,		NewState)
#define RCC_PeriphClockCmd_SRAM(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_SRAM,		NewState)
#define RCC_PeriphClockCmd_FLITF(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FLITF,		NewState)
#define RCC_PeriphClockCmd_CRC(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC,		NewState)
#define RCC_PeriphClockCmd_OTG_FS(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_OTG_FS,		NewState)
#define RCC_PeriphClockCmd_ETH_MAC(NewState)	RCC_AHBPeriphClockCmd(RCC_AHBPeriph_ETH_MAC,	NewState)
#define RCC_PeriphClockCmd_ETH_MAC_Tx(NewState)	RCC_AHBPeriphClockCmd(RCC_AHBPeriph_ETH_MAC_Tx,	NewState)
#define RCC_PeriphClockCmd_ETH_MAC_Rx(NewState)	RCC_AHBPeriphClockCmd(RCC_AHBPeriph_ETH_MAC_Rx,	NewState)
#define RCC_PeriphClockCmd_FSMC(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC,		NewState)
#define RCC_PeriphClockCmd_SDIO(NewState)		RCC_AHBPeriphClockCmd(RCC_AHBPeriph_SDIO,		NewState)

#define RCC_PeriphClockCmd_TIM2(NewState)		RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, 	NewState)
#define RCC_PeriphClockCmd_TIM3(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, 	NewState)
#define RCC_PeriphClockCmd_TIM4(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, 	NewState)
#define RCC_PeriphClockCmd_TIM5(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM5, 	NewState)
#define RCC_PeriphClockCmd_TIM6(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, 	NewState)
#define RCC_PeriphClockCmd_TIM7(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM7, 	NewState)
#define RCC_PeriphClockCmd_WWDG(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, 	NewState)
#define RCC_PeriphClockCmd_SPI2(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, 	NewState)
#define RCC_PeriphClockCmd_SPI3(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI3, 	NewState)
#define RCC_PeriphClockCmd_USART2(NewState) 	RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, 	NewState)
#define RCC_PeriphClockCmd_USART3(NewState) 	RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, 	NewState)
#define RCC_PeriphClockCmd_UART4(NewState)  	RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART4, 	NewState)
#define RCC_PeriphClockCmd_UART5(NewState)  	RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART5, 	NewState)
#define RCC_PeriphClockCmd_I2C1(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, 	NewState)
#define RCC_PeriphClockCmd_I2C2(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2, 	NewState)
#define RCC_PeriphClockCmd_USB(NewState) 		RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, 		NewState)
#define RCC_PeriphClockCmd_CAN1(NewState)   	RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1, 	NewState)
#define RCC_PeriphClockCmd_BKP(NewState) 		RCC_APB1PeriphClockCmd(RCC_APB1Periph_BKP, 		NewState)
#define RCC_PeriphClockCmd_PWR(NewState) 		RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, 		NewState)
#define RCC_PeriphClockCmd_DAC(NewState) 		RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, 		NewState)
#define RCC_PeriphClockCmd_CEC(NewState) 		RCC_APB1PeriphClockCmd(RCC_APB1Periph_CEC, 		NewState)
#define RCC_PeriphClockCmd_TIM12(NewState)  	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM12, 	NewState)
#define RCC_PeriphClockCmd_TIM13(NewState)  	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM13, 	NewState)
#define RCC_PeriphClockCmd_TIM14(NewState)  	RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM14, 	NewState)

#define RCC_PeriphClockCmd_AFIO(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, 	NewState)
#define RCC_PeriphClockCmd_GPIOA(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, 	NewState)
#define RCC_PeriphClockCmd_GPIOB(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, 	NewState)
#define RCC_PeriphClockCmd_GPIOC(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, 	NewState)
#define RCC_PeriphClockCmd_GPIOD(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, 	NewState)
#define RCC_PeriphClockCmd_GPIOE(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, 	NewState)
#define RCC_PeriphClockCmd_GPIOF(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF, 	NewState)
#define RCC_PeriphClockCmd_GPIOG(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOG, 	NewState)
#define RCC_PeriphClockCmd_ADC1(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, 	NewState)
#define RCC_PeriphClockCmd_ADC2(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC2, 	NewState)
#define RCC_PeriphClockCmd_TIM1(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, 	NewState)
#define RCC_PeriphClockCmd_SPI1(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, 	NewState)
#define RCC_PeriphClockCmd_TIM8(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM8, 	NewState)
#define RCC_PeriphClockCmd_USART1(NewState) 	RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, 	NewState)
#define RCC_PeriphClockCmd_ADC3(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC3, 	NewState)
#define RCC_PeriphClockCmd_TIM15(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM15, 	NewState)
#define RCC_PeriphClockCmd_TIM16(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM16, 	NewState)
#define RCC_PeriphClockCmd_TIM17(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM17, 	NewState)
#define RCC_PeriphClockCmd_TIM9(NewState)   	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM9, 	NewState)
#define RCC_PeriphClockCmd_TIM10(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM10, 	NewState)
#define RCC_PeriphClockCmd_TIM11(NewState)  	RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM11, 	NewState)

// 外设复位
#define RCC_PeriphResetCmd_OTG_FS(NewState)		RCC_AHBPeriphResetCmd(RCC_AHBPeriph_OTG_FS,		NewState)
#define RCC_PeriphResetCmd_ETH_MAC(NewState)	RCC_AHBPeriphResetCmd(RCC_AHBPeriph_ETH_MAC,	NewState)

#define RCC_PeriphResetCmd_TIM2(NewState)		RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, 	NewState)
#define RCC_PeriphResetCmd_TIM3(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, 	NewState)
#define RCC_PeriphResetCmd_TIM4(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, 	NewState)
#define RCC_PeriphResetCmd_TIM5(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, 	NewState)
#define RCC_PeriphResetCmd_TIM6(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, 	NewState)
#define RCC_PeriphResetCmd_TIM7(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, 	NewState)
#define RCC_PeriphResetCmd_WWDG(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, 	NewState)
#define RCC_PeriphResetCmd_SPI2(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_SPI2, 	NewState)
#define RCC_PeriphResetCmd_SPI3(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_SPI3, 	NewState)
#define RCC_PeriphResetCmd_USART2(NewState) 	RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, 	NewState)
#define RCC_PeriphResetCmd_USART3(NewState) 	RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, 	NewState)
#define RCC_PeriphResetCmd_UART4(NewState)  	RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, 	NewState)
#define RCC_PeriphResetCmd_UART5(NewState)  	RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, 	NewState)
#define RCC_PeriphResetCmd_I2C1(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C1, 	NewState)
#define RCC_PeriphResetCmd_I2C2(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C2, 	NewState)
#define RCC_PeriphResetCmd_USB(NewState) 		RCC_APB1PeriphResetCmd(RCC_APB1Periph_USB, 		NewState)
#define RCC_PeriphResetCmd_CAN1(NewState)   	RCC_APB1PeriphResetCmd(RCC_APB1Periph_CAN1, 	NewState)
#define RCC_PeriphResetCmd_BKP(NewState) 		RCC_APB1PeriphResetCmd(RCC_APB1Periph_BKP, 		NewState)
#define RCC_PeriphResetCmd_PWR(NewState) 		RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, 		NewState)
#define RCC_PeriphResetCmd_DAC(NewState) 		RCC_APB1PeriphResetCmd(RCC_APB1Periph_DAC, 		NewState)
#define RCC_PeriphResetCmd_CEC(NewState) 		RCC_APB1PeriphResetCmd(RCC_APB1Periph_CEC, 		NewState)
#define RCC_PeriphResetCmd_TIM12(NewState)  	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, 	NewState)
#define RCC_PeriphResetCmd_TIM13(NewState)  	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, 	NewState)
#define RCC_PeriphResetCmd_TIM14(NewState)  	RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, 	NewState)

#define RCC_PeriphResetCmd_AFIO(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_AFIO, 	NewState)
#define RCC_PeriphResetCmd_GPIOA(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOA, 	NewState)
#define RCC_PeriphResetCmd_GPIOB(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOB, 	NewState)
#define RCC_PeriphResetCmd_GPIOC(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOC, 	NewState)
#define RCC_PeriphResetCmd_GPIOD(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOD, 	NewState)
#define RCC_PeriphResetCmd_GPIOE(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOE, 	NewState)
#define RCC_PeriphResetCmd_GPIOF(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOF, 	NewState)
#define RCC_PeriphResetCmd_GPIOG(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOG, 	NewState)
#define RCC_PeriphResetCmd_ADC1(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC1, 	NewState)
#define RCC_PeriphResetCmd_ADC2(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC2, 	NewState)
#define RCC_PeriphResetCmd_TIM1(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, 	NewState)
#define RCC_PeriphResetCmd_SPI1(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1, 	NewState)
#define RCC_PeriphResetCmd_TIM8(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, 	NewState)
#define RCC_PeriphResetCmd_USART1(NewState) 	RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, 	NewState)
#define RCC_PeriphResetCmd_ADC3(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC3, 	NewState)
#define RCC_PeriphResetCmd_TIM15(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, 	NewState)
#define RCC_PeriphResetCmd_TIM16(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, 	NewState)
#define RCC_PeriphResetCmd_TIM17(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, 	NewState)
#define RCC_PeriphResetCmd_TIM9(NewState)   	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, 	NewState)
#define RCC_PeriphResetCmd_TIM10(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, 	NewState)
#define RCC_PeriphResetCmd_TIM11(NewState)  	RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, 	NewState)


#ifdef __cplusplus
extern "C" {
#endif



#ifdef __cplusplus
} //extern "C"
#endif
